package com.module.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpSession;

@RestController
public class ShowLoginController {
    @Autowired
    private StringRedisTemplate redisTemplate;
    @RequestMapping("/show")
    public String login(HttpSession session){
        String login_user = redisTemplate.opsForValue().get("login_user");
        Object springsession_user = session.getAttribute("springsession_user");


        return "redis:"+login_user+"|||springsession:"+springsession_user;
    }

}
